// Copyright 2012-present OSBI Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

html {
  height: 100%;
}

body {
  height: 100%;
  font-family: $font-family;
  font-size: $font-size;
  line-height: 1.15;
  color: $color-font;

  -webkit-font-smoothing: antialiased;
}

a {
  color: $color-font;
  text-decoration: none !important;

  &:hover {
    color: $color-font;
    text-decoration: none !important;
  }
}

.page-wrapper {
  display: flex;
  min-height: 100%;
}

.content-inner {
  flex-grow: 1;
  box-sizing: border-box;
  padding: 30px 60px;

  &.no-padding-top {
    padding-top: 0;
  }

  &.no-padding-right {
    padding-right: 0;
  }

  &.no-padding-bottom {
    padding-bottom: 0;
  }

  &.no-padding-left {
    padding-left: 0;
  }

  > .sku-settings-content {
    margin-left: 59px;
  }

  @media (max-width: $media-lg) {
    width: calc(100vw - 319px);
  }

  @media (max-width: $media-md) {
    padding: 30px 30px;
  }
}

.sku-btn-group-end {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

// BlockUi styles

.block-ui-container {
  position: fixed !important;
}

// Blueprintjs styles

.bp3-overlay {
  z-index: 2000 !important;
}

.bp3-transition-container {
  &.bp3-popover-enter-done {
    z-index: 2001 !important;
  }
}

.bp3-dialog {
  background: #fff !important;
}

.bp3-tree-node.bp3-tree-node-selected {
  > .bp3-tree-node-content {
    background-color: $saiku-color !important;
  }
}

.bp3-input {
  &:focus,
  .bp3-active {
    border: 1px solid $saiku-color !important;
    box-shadow: 0 0 0 1px $saiku-color !important;
  }
}

.bp3-switch {
  input:checked ~ .bp3-control-indicator {
    background: $saiku-color !important;
  }
}

.bp3-checkbox {
  input:checked ~ .bp3-control-indicator {
    background: $saiku-color !important;
  }
}

.bp3-menu-item {
  &.bp3-intent-primary {
    &.bp3-active {
      background-color: $saiku-color !important;
    }
  }
}

// Ant Design Styles

.ant-input {
  &:hover {
    border: 1px solid $saiku-color !important;
  }

  &:focus {
    border: 1px solid $saiku-color !important;
    box-shadow: 0 0 0 1px $saiku-color !important;
  }
}

.ant-checkbox-wrapper:hover .ant-checkbox-inner,
.ant-checkbox:hover .ant-checkbox-inner,
.ant-checkbox-input:focus + .ant-checkbox-inner {
  border-color: $saiku-color !important;
}

.ant-checkbox-indeterminate {
  .ant-checkbox-inner {
    &::after {
      background-color: $saiku-color !important;
    }
  }
}

.ant-checkbox-checked {
  .ant-checkbox-inner {
    border-color: $saiku-color !important;
    background-color: $saiku-color !important;
  }
}

.ant-switch-checked {
  background-color: $saiku-color !important;
}

.ant-btn-primary {
  &:not([disabled]) {
    border-color: $saiku-color !important;
    background-color: $saiku-color !important;
  }
}

.ant-pagination-item {
  a {
    &:hover {
      color: $saiku-color !important;
    }
  }
}

.ant-pagination-item-active {
  border-color: $saiku-color !important;

  a {
    color: $saiku-color !important;

    &:hover {
      color: $saiku-color !important;
    }
  }
}

.ant-pagination-item-link {
  &:hover {
    color: $saiku-color !important;
  }
}

.ant-select-dropdown {
  z-index: 2002 !important;
}

.ant-tabs-tab-active {
  color: $saiku-color !important;
}

.ant-tabs-ink-bar {
  background-color: $saiku-color !important;
}

.ant-tabs-nav {
  .ant-tabs-tab {
    &:hover {
      color: $saiku-color !important;
    }
  }
}
